﻿using System.Web;
using System.Web.Mvc;

using Presentation.Web.MVC.Client.ViewModels;

namespace Presentation.Web.MVC.Client.Controllers
{
    /// <summary>
    /// Controller for the home page.
    /// </summary>
    [HandleError]
    public class HomeController : Controller
    {



        #region Actions



        /// <summary>
        /// Index of the web page.
        /// </summary>
        /// <returns>The index view of the web.</returns>
        public ActionResult Index()
        {
            ViewData["Nessage"] = "Welcome";

            return View();
        }




        [ChildActionOnly]
        public ActionResult Menu()
        {
            string controller = ControllerContext.ParentActionViewContext.RouteData.GetRequiredString("controller");
            string action = ControllerContext.ParentActionViewContext.RouteData.GetRequiredString("action");

            return View(new MenuStateViewModel(controller, action));
        }



        #endregion Actions
                

    }
}
